#{extends 'admin.html' /}
#{set title:'Administration : Création d\'un Circuit' /}
#{if flash.error}
    <h4 class="alert_error">${flash.error}</h4>
#{/if}



<article class="module width_full">
    <header><h3 class="tabs_involved">Ajouter un Circuits</h3>
        <ul class="tabs">
            <li><a href="@{Circuits.list}">Annuler</a></li>
        </ul>

    </header>

    <div class="entity">
        #{form @Circuits.save(), id:'createForm'}
        <div class="module_content">
        <fieldset>
                <label>Nom du circuit : </label>
                <input type="text" name="entity.name" value="${entity?.name}"/>
                <span class="error">${errors.forKey('entity.name')}</span>
                
                
            </fieldset>
            <fieldset>
                <label>Distance du circuit : </label>
                <input type="text" name="entity.miles" value="${entity?.miles}"/>
                <span class="error">${errors.forKey('entity.miles')}</span> Km
            </fieldset>
<!--             <input type="hidden" name="entity.id" value="${entity?.id}" /> -->

            <input type="submit" name="submit" value="Ajouter !" class="alt_btn"/>
         </div>
         
		#{/form}
	</div>
	
</article>